package com.zr.repertory.affiliation.service.impl;

import com.zr.repertory.affiliation.mapper.WareAreaMapper;
import com.zr.repertory.affiliation.model.pojo.StorageSectionVo;
import com.zr.repertory.affiliation.model.pojo.WareArea;
import com.zr.repertory.affiliation.model.pojo.WareAreaAttribute;
import com.zr.repertory.affiliation.service.WareAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName WareAreaServiceImpl
 * @Description TODO
 * @Author Jiakui_Ma
 * @Date 2019/11/21 16:10
 */
@Service
public class WareAreaServiceImpl implements WareAreaService {
    @Autowired
    private WareAreaMapper wareAreaMapper;

    /**
     * 根据法人id查询库区
     * @param legalPersonId
     * @return
     */
    @Override
    public List<WareArea> queryStorageSectionByLegalPersonId(Integer legalPersonId) {

        return wareAreaMapper.queryStorageSectionByLegalPersonId( legalPersonId);
    }

    /**
     * 库区查询
     * @param storageSectionVo
     * @return
     */
    @Override
    public List<WareArea> queryStorageSection(StorageSectionVo storageSectionVo) {

        return wareAreaMapper.queryStorageSection(storageSectionVo);
    }

    /**
     * 属性
     * @param id
     * @return
     */
    @Override
    public List<WareAreaAttribute> queryBusinessAttributeById(Integer id) {

        return wareAreaMapper.queryBusinessAttributeById(id);
    }
}
